package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.DstUserSettingDTO;
import com.financing.wap.dao.IDstUserSettingDao;
import com.financing.wap.common.SqlName;
/**
 * dst_user_setting  
 * 用户提醒设置 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstUserSettingDao")
public class DstUserSettingDaoImpl extends BaseDaoImpl<DstUserSettingDTO, java.lang.Integer> implements IDstUserSettingDao {


	@Override
	public int insert(DstUserSettingDTO dstUserSetting) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstUserSettingSql.insert, dstUserSetting);
	}

	@Override
	public void update(DstUserSettingDTO dstUserSetting) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserSettingSql.update, dstUserSetting);
	}

	@Override
	public void updateForce(DstUserSettingDTO dstUserSetting) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstUserSettingSql.updateForce, dstUserSetting);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstUserSettingSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstUserSettingDTO> queryList(DstUserSettingDTO dstUserSetting) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstUserSettingSql.queryList, dstUserSetting);
	}

	@Override
	public int queryListCount(DstUserSettingDTO dstUserSetting) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstUserSettingSql.queryListCount, dstUserSetting);
	}

	@Override
	public DstUserSettingDTO loadById(Integer id) throws SQLException {
		return  (DstUserSettingDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstUserSettingSql.loadById,id);
	}

	@Override
	public Class<DstUserSettingDTO> getEntityClass() {
		return DstUserSettingDTO.class;
	}
 	
}
